#!/usr/bin/env node

const http = require('http'),
      fs   =require('fs'),
      log  = console.log();
http.createServer(('request',(req,res)=>{
 console.log(`${req.method} ${req.url} HTTP/${req.httpVersion}`);
  console.log(req.headers);
  console.log();

  const file = __dirname+req.url;
console.log(file);
  res.end(fs.readFileSync(file).toString('utf8'));

})).listen(8080)
